<template>
  <div v-for="(item,index) in todos" :key="item.text">
    <Item :item="item"
          :index="index"></Item>
  </div>

</template>

<script>

import Item from "./Item.vue"
import {inject} from "vue";

export default {
  name: "List",
  setup(){
    const todos = inject("todoList")
    return {
      todos
    }
  },
  components: {
    Item
  }
}
</script>

<style scoped>


</style>